package annotation;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;

public class TestAnnotationDemo {
    public static void main(String[] args) {
        try {
            Object obj = new TestAnnotationReflectionBase();
            Class clazz = obj.getClass();
            Field f = clazz.getDeclaredField("str");
            Object a = f.getDeclaredAnnotation(MyAnnotation.class);
            //todo We still need to figure out how fields of Annotations can be retrieved at runtime the value can be known by spring
            Field[] fields = a.getClass().getFields();
            System.out.println();
        } catch (NoSuchFieldException e) {
            e.printStackTrace();
        }

    }
}
